package com.liyi.letter.processing.enums;

import com.mybatisflex.annotation.EnumValue;
import lombok.Getter;

/**
 * @program: letter_parent
 * @description
 * @author: tianwen
 * @create: 2023-06-16 15:20
 **/
@Getter
public enum ProcessingEffectiveness {
    PHONE("良好",401),
    VIDEO("一般",402),
    SHORT_LETTER("较差",403);
    private String comment;
    @EnumValue
    private Integer code;
    private ProcessingEffectiveness(String comment, Integer code){
        this.comment=comment;
        this.code=code;
    }

    public static String getNameByType(String type) {
        ProcessingEffectiveness arrObj[] = ProcessingEffectiveness.values();
        for (ProcessingEffectiveness obj : arrObj) {
            if (obj.name().equals(type)) {
                return obj.getComment();
            }
        }
        return "";
    }

}
